<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
		'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
		'name'=>'Guszti',
		'language'=>'hu',

		// preloading 'log' component
		'preload'=>array('log', 'bootstrap'),

		// autoloading model and component classes
		'import'=>array(
				'application.models.*',
				'application.components.*',
                'application.modules.rights.*', 'application.modules.rights.components.*',
		),

		'modules'=>array(
				// uncomment the following to enable the Gii tool

				'gii'=>array(
						'class'=>'system.gii.GiiModule',
						'password'=>'generator',
						'generatorPaths' => array(
								'ext.giiplus',
						),
						// If removed, Gii defaults to localhost only. Edit carefully to taste.
						'ipFilters'=>array('127.0.0.1','::1'),
				),

                 'rights'=>array(
                    'install'=>false,
                    'layout'=>'application.views.layouts.main',
                    'userNameColumn'=>'username',
                    'superuserName'=>'admin',
                    'flashSuccessKey'=>'success',
                    'flashErrorKey'=>'error',
                    'authenticatedName'=>'Authenticated',
                    'displayDescription' => false,
                 )

		),

		// application components
		'components'=>array(
				'user'=>array(
                        'class'=>'RWebUser',
						// enable cookie-based authentication
						'allowAutoLogin'=>true,
				),
				'session' => array(
					'autoStart'=>true,
				),
				'bootstrap'=>array(
					'class'=>'ext.bootstrap.components.Bootstrap', // assuming you extracted bootstrap under extensions
					'coreCss'=>true, // whether to register the Bootstrap core CSS (bootstrap.min.css), defaults to true
					'responsiveCss'=>true, // whether to register the Bootstrap responsive CSS (bootstrap-responsive.min.css), default to false
					'enableJS'=>true,
					'plugins'=>array(
						// Optionally you can configure the "global" plugins (button, popover, tooltip and transition)
						// To prevent a plugin from being loaded set it to false as demonstrated below
						'transition'=>false, // disable CSS transitions
						'tooltip'=>array(
							'selector'=>'a.tooltip', // bind the plugin tooltip to anchor tags with the 'tooltip' class
						    'options'=>array(
							    'placement'=>'bottom', // place the tooltips below instead
						    ),
						),
					),
				),
				// uncomment the following to enable URLs in path-format

				'urlManager'=>array(
    				'urlFormat'=>'path',
    				'showScriptName'=>false,
    				'urlSuffix'=>'.html',
    				'rules'=>array(
        				'<controller:\w+>/<id:\d+>'=>'<controller>/view',
        				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
        				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
    				),
				),


				// uncomment the following to use a MySQL database

				'db'=>array(
                    'connectionString' => 'mysql:host=localhost;dbname=anett',
                    'emulatePrepare' => true,
                    'username' => 'root',
                    'password' => '',
                    'charset' => 'utf8',
                    'enableProfiling'=>true,
                    'enableParamLogging'=>true,
				),

                'authManager'=>array(

                    'class'=>'application.modules.rights.components.RDbAuthManager',
                    // The database component used
                    'connectionID'=>'db',
                        // The itemTable name (default:authitem)
                    'itemTable'=>'authitem',
                    // The assignmentTable name (default:authassignment)
                    'assignmentTable'=>'authassignment',
                    // The itemChildTable name (default:authitemchild)
                    'itemChildTable'=>'authitemchild',

                    ),

				'errorHandler'=>array(
				// use 'site/error' action to display errors
				'errorAction'=>'site/error',
				),
				'log'=>array(
                    'class'=>'CLogRouter',
                    'routes'=>array(
                        array(
                            'class'=>'CFileLogRoute',
                            'levels'=>'error, warning',
                        ),
                        array(
                            'class'=>'ext.yii-debug-toolbar.YiiDebugToolbarRoute',
                            'ipFilters'=>array('127.0.0.1'),
                        ),
                        /* array(
                            'class'=>'CEmailLogRoute',
                            'levels'=>'error, warning',
                            'emails'=>'zsolt.lengyel.it@gmail.com',
                            'subject'=>'anett log',
                            'sentFrom'=>'anett@latech.com',
                        ),*/
				// uncomment the following to show log messages on web pages
				/*
				array(
				'class'=>'CWebLogRoute',
				),
		*/
				),
				),
		),

		// application-level parameters that can be accessed

		'params'=>array(
                // password salst
		    'salt'=>'bdb.&@{vdgdg15',
    		// this is used in contact page
		    'adminEmail'=>'webmaster@example.com',
		),
);